package com.huluobo.a2307douyindemo.demo.databinding

import com.huluobo.a2307douyindemo.databinding.ActivityUserBinding
import com.huluobo.a2307douyindemo.demo.viewbinding.BaseActivity2

class UserActivity : BaseActivity2<ActivityUserBinding>() {

    override fun initData() {
    }

    override fun initView() {
        binding.userBtn.setOnClickListener {
            //点击时,生成一个User对象
            val user = User(binding.userNameEt.text.toString(), binding.userPassEt.text.toString())
            //给xml上声明的User赋值
            binding.user = user
        }
    }

    override fun getViewBinding(): ActivityUserBinding {
        return ActivityUserBinding.inflate(layoutInflater)
    }
}